import request from '@/utils/request'

// 查询角色列表
export function listAssets(query) {
  return request({
    url: '/logistics/assets/list',
    method: 'get',
    params: query
  })
}

// 查询所有角色列表
export function listAllAssets() {
  return request({
    url: '/logistics/assets/listAll',
    method: 'get'
  })
}

// 查询角色详细
export function getAssets(assetsId) {
  return request({
    url: '/logistics/assets/info/' + assetsId,
    method: 'get'
  })
}

// 新增角色
export function addOrUpdateAssets(data) {
  return request({
    url: '/logistics/assets/addOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除角色
export function delAssets(assetsIds) {
  return request({
    url: '/logistics/assets/deleteByIds/' + assetsIds,
    method: 'delete'
  })
}

// 导出角色
export function exportAssets(query) {
  return request({
    url: '/logistics/assets/export',
    method: 'get',
    responseType:'blob',
    params: query
  })
}
